package com.atguigu.dao;

import com.atguigu.base.BaseDAO;
import com.atguigu.entity.House;
import com.atguigu.vo.HouseQueryVo;
import com.atguigu.vo.HouseVo;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

/**
 * @PACKAGE_NAME: com.atguigu.dao
 * @CLASSNAME: HouseDao
 * @AUTHOR: zhangsan
 * @DATE: 2024/4/22 15:29
 * @SINCE 17.0.7
 * @DESCRIPTION: HouseDao 房源管理
 */
public interface HouseDAO extends BaseDAO<House> {
    /**
     * 修改房源的状态 1 已经发布 0 未发布
     *
     * @param id
     * @param status
     * @return
     */
    Integer updateHouseStatus(@Param("id") Long id, @Param("status") Integer status);


    House getDictNameById(Long id);

    /**
     * 通过前端前台首页传递过来的查询条件查询房源
     * @param houseQueryVo
     * @return
     */
    Page<HouseVo> findListPage(@Param("houseQueryVo") HouseQueryVo houseQueryVo);
}
